/**
 * 
 */
package test;

import java.util.HashMap;

import oracle.sql.BLOB;

import org.hibernate.Hibernate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.ims.stocks.model.UserDetails;

/**
 * @author at2399
 * 
 */
public class MainClass {

	private static com.ims.common.service.BaseService bs = null;
	ApplicationContext appContext = null;
	private final static String[] configLocations = new String[] {
			"applicationContext-action.xml", "applicationContext-dao.xml",
			"applicationContext-main.xml", "applicationContext-service.xml", };

	/**
	 * 
	 */
	public MainClass() {
		try {
			initComponents();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void initComponents() {
		if (appContext == null) {
			appContext = new ClassPathXmlApplicationContext(configLocations);
		}

		if (bs == null) {
			bs = (com.ims.common.service.BaseService) appContext
					.getBean("baseService");
			// bs.execute();
		}

	}

	/**
	 * @param args
	 */
	@SuppressWarnings("unchecked")
	public static void main(String[] args) {

		new MainClass();

	}

}
